package main

// https://gfw.go101.org/article/bounds-check-elimination.html
// 边界检查
// go run -gcflags="-d=ssa/check_bce/debug=1" bceTest.go
func f1(s []int) {
	_ = s[0]
	_ = s[2]
	_ = s[1]
}

func f2(s []int) {
	_ = s[2]
	_ = s[1]
	_ = s[0]
}

func f3(s []int, index int) {
	_ = s[index]
	_ = s[index]
}

func f4(a [5]int) {
	_ = a[4]
}

func main() {}
